package com.flitsneak.designpatterns.creationalpatterns.singleton;

/**
 * Author: flitsneak
 * Date: 2022/5/31 13:18
 * Description: 饿汉式
 */
public class HungrySingleton {
    private static final HungrySingleton HUNGRY_SINGLETON = new HungrySingleton();

    //构造方法私有化
    private HungrySingleton() {
    }

    public static HungrySingleton getSingleton() {
        return HUNGRY_SINGLETON;
    }

    //其他逻辑 static方法
}
